<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" %>
<html>
<head>
    <title>上传文件</title>
    <link rel="stylesheet" href="layui/css/layui.css" media="all">
    <style>
        td {
            width: 200px;
            height: 200px;
            text-align: center;
        }
    </style>
</head>
<body style="height: 500px;width: 500px;">
<div style="padding: 15px">
    <form class="layui-form" method="post" id="setup" action="<c:url value="/upload"/>">
        <div class="layui-form-item">
            <label class="layui-form-label">输入密码（无密码则留空）</label>
            <div class="layui-input-block">
                <input type="password" name="password" required lay-verify="required" placeholder="请输入密码"
                       autocomplete="off" class="layui-input">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">高级设置</label>
            <div class="layui-input-block">
                <input type="checkbox" id="advanceSwitch" lay-filter="advanceSwitch" lay-skin="switch">
            </div>
        </div>
        <div id="advanceOption" style="display: none">
            <div class="layui-form-item">
                <label class="layui-form-label">下载次数</label>
                <select id="times">
                    <option value=3>3次</option>
                    <option value=5>5次</option>
                    <option value=10>10次</option>
                </select>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">保留时长</label>
                <select id="days">
                    <option value=3>3天</option>
                    <option value=5>5天</option>
                    <option value=10>10天</option>
                </select>
            </div>
        </div>
        <p>
            <button type="button" class="layui-btn layui-btn-lg layui-btn-radius layui-btn-normal" id="fileUpload">
                选择文件
            </button>
        </p>
        <p>
            <button type="button" class="layui-btn layui-btn-lg layui-btn-radius layui-btn-normal" id="submit">上传文件
            </button>
        </p>
    </form>
</div>
</body>
<script src="layui/layui.js"></script>
<script src="js/upload.js"></script>
<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
</html>
